LinearOperator - A generic, high-level expression syntax for linear algebra
نویسندگان
چکیده
We introduce an expression syntax for the evaluation of matrix-matrix, matrix-vector and vector-vector operations. The implementation is similar to the well-known general concept of expression templates as used, for example, in the C++ linear-algebra libraries Eigen and Blaze. The novelty of the approach that is discussed here lies in the use of new C++11 features like lambda expressions and std::function objects that avoids the majority of the implementational complexity that usually comes with a pure template solution. A concrete implementation of the expression syntax has been developed within the framework of the finite-element library deal.II, but it is fairly generic: the LinearOperator implementation only requires a minimal vector and matrix interface, that all of deal.II’s concrete vector and matrix types adhere to. This makes the interface fully transparent with respect to the concrete implementation, in particular to the storage strategy (full matrix, sparse structure), and memory strategy (local, shared, distributed). The paper concludes with a number of performance comparisons and examples that demonstrate that the framework results in efficient, short and concise code. The performance comparisons show that the overhead introduced by std::function objects is negligible for moderately sized matrices, even when compared to native expression-template implementations.
منابع مشابه
Interchangeable High-Level Time Petri Nets
We present a definition for a generic Time Petri net class covering most Time Petri net types known to the community. Due to the generic approach presented in this paper, the proposed syntax may as well be used as a proposal for an expression syntax of High-level Petri nets. Furthermore we present an implementation of translations between different Statically Timed Petri nets based on the prese...
متن کاملA Modern Framework for Portable High Performance Numerical Linear Algebra
byJeremy G. Siek This thesis describes a generic programming methodology for expressing data struc-tures, algorithms, and optimizations for numerical linear algebra. A high-performanceimplementation of this approach, the Matrix Template Library (MTL), is also described.The goal of the MTL is to facilitate development of higher-level libraries and applicationsfor scientif...
متن کاملLinear syntax for communicating elementary mathematics
We consider computer aided assessment (CAA) of mathematics in which a student provides an answer in the form of a mathematical expression. A common approach is for CAA system implementors to adopt a linear syntax to allow students to communicate their answer to the machine. In this paper we consider the problems students encounter when mediating between (i) traditional mathematical notation and...
متن کاملGeneric Programming for High Performance Numerical Linear Algebra
We present a generic programming methodology for expressing data structures and algorithms for high-performance numerical linear algebra. As with the Standard Template Library [14], our approach explicitly separates algorithms from data structures, allowing a single set of numerical routines to operate with a wide variety of matrix types, including sparse, dense, and banded. Through the use of ...
متن کاملThe Matrix Template Library: A Generic Programming Approach to High Performance Numerical Linear Algebra
We present a unified approach for expressing high performance numerical linear algebra routines for large classes of dense and sparse matrices. As with the Standard Template Library [10], we explicitly separate algorithms from data structures through the use of generic programming techniques. We conclude that such an approach does not hinder high performance. On the contrary, writing portable h...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Computers & Mathematics with Applications
دوره 72 شماره
صفحات -
تاریخ انتشار 2016